<!DOCTYPE html>
<html>
<head>
	<title>{{ lesson.title }}</title>
	{% if setting('site.favicon') %}
	<link href="{{ asset(setting('site.favicon')) }}" rel="shortcut icon" />
	{% endif %}
<link href="{{ asset('assets/v2/bootstrap/css/bootstrap.css') }}" rel="stylesheet" />
<link href="{{ asset('assets/css/zhibo/video-js.css') }}" rel="stylesheet" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="position:absolute;top:0;left:0;bottom:0;right:0;margin:0px;padding:0px;overflow:hidden;">

{% if lesson.zhiboliu != '' %}
	 <div id="player" style="width:100%; height: 800px;">
            <div id="player6DB5D79BA24EB189A234D9C76FCB4849" style="position: relative;width: 100%;height:100%;margin-right:auto;margin-left:auto">
                <video style="width:100%;height:100%" id="videojs-contrib-hls-player" class="video-js vjs-default-skin vjs-big-play-centered" controls >
                    <source src="{{lesson.mediaUri}}" type="application/x-mpegURL">
                </video>
            </div>
        </div>
   {% else %}  
   <iframe width="100%" height="100%" src = "{{lesson.mediaUri}}&nickname={{ app.user.nickname }}""></iframe>
 {% endif  %}
</body>
</html>
{% if lesson.zhiboliu != '' %}
<script src="{{ asset('/assets/js/zhibo/video.js') }}"></script>
<script src="{{ asset('/assets/js/zhibo/videojs-contrib-hls.js') }}"></script>
<script>
	(function(window, videojs) {
		var player = window.player = videojs('videojs-contrib-hls-player');
		var loadUrl = document.getElementById('load-url');
		var url = document.getElementById('url');
		loadUrl.addEventListener('submit', function(event) {
			event.preventDefault();
			player.src({
				src: url.value,
				type: 'application/x-mpegURL'
			});
			return true;
		});
	}(window, window.videojs));
</script>
 {% endif  %}